<template>
  <Panel title="共有 3 个回复">
    <div slot="container">
      <div class="px-4 py-2">
        <div class="flex">
          <div class="h-8 w-8 mr-1">
            <img
              class="rounded-full border"
              src="https://cdn.learnku.com/uploads/avatars/19883_1510295716.jpeg!/both/100x100"
              alt=""
            />
          </div>
          <div class="flex w-full mx-1 items-center justify-between">
            <div class="flex">
              <a href="#" class="font-bold text-sm hover:text-gray-900 mx-1"
                >zhapengme</a
              >
              <div class="text-sm text-gray-500 mx-1">2020-04-10 23:58:52</div>
            </div>
            <div>
              <div class="text-gray-700 text-sm"># 1</div>
            </div>
          </div>
        </div>
        <div class="py-2">
          <article class="markdown-body">
            <p>
              <a
                class="user-mention"
                data-hovercard-type="user"
                data-hovercard-url="/users/xiaomingping/hovercard"
                data-octo-click="hovercard-link-click"
                data-octo-dimensions="link_type:self"
                href="https://github.com/xiaomingping"
                >@xiaomingping</a
              >
              我帮你组织了一下代码，可执行的代码如下：
            </p>
            <div class="highlight highlight-source-go">
              <pre><span class="pl-k">package</span> main

<span class="pl-k">import</span> (
	<span class="pl-s"><span class="pl-pds">"</span>github.com/gogf/gf/frame/g<span class="pl-pds">"</span></span>
	<span class="pl-s"><span class="pl-pds">"</span>github.com/gogf/gf/net/ghttp<span class="pl-pds">"</span></span>
)

<span class="pl-k">func</span> <span class="pl-en">main</span>() {
	<span class="pl-smi">s</span> <span class="pl-k">:=</span> g.<span class="pl-c1">Server</span>()
	s.<span class="pl-c1">BindHandler</span>(<span class="pl-s"><span class="pl-pds">"</span>/<span class="pl-pds">"</span></span>, <span class="pl-c1">func</span>(r *ghttp.<span class="pl-smi">Request</span>) {
		<span class="pl-k">type</span> UpdateParam <span class="pl-k">struct</span> {
			Id       <span class="pl-k">int</span>    <span class="pl-s"><span class="pl-pds">`</span>v:"required|integer"         json:"id"<span class="pl-pds">`</span></span>
			Name     <span class="pl-k">string</span> <span class="pl-s"><span class="pl-pds">`</span>v:"required|length:1,21#请输入名称|名称最大21个中文" json:"name"<span class="pl-pds">`</span></span>
			RoleKey  <span class="pl-k">string</span> <span class="pl-s"><span class="pl-pds">`</span>v:"required|max-length:85#请输入角色代码|角色代码最大85个字符"    json:"role_key"<span class="pl-pds">`</span></span> <span class="pl-c"><span class="pl-c">//</span> 角色代码</span>
			Remark   <span class="pl-k">string</span> <span class="pl-s"><span class="pl-pds">`</span>v:"max-length:200#描述最多60个中文"      json:"remark"<span class="pl-pds">`</span></span>                   <span class="pl-c"><span class="pl-c">//</span> 备注</span>
			Status   <span class="pl-k">string</span> <span class="pl-s"><span class="pl-pds">`</span>v:"required|in:0,1#请选择状态|状态只能是0或者1"      json:"status"<span class="pl-pds">`</span></span>            <span class="pl-c"><span class="pl-c">//</span> 状态</span>
			RoleSort <span class="pl-k">int</span>    <span class="pl-s"><span class="pl-pds">`</span>v:"integer#排序只能是数字"   json:"role_sort"<span class="pl-pds">`</span></span>                            <span class="pl-c"><span class="pl-c">//</span> 角色排序</span>
		}
		<span class="pl-k">var</span> <span class="pl-smi">param</span> UpdateParam
		<span class="pl-k">if</span> <span class="pl-smi">err</span> <span class="pl-k">:=</span> r.<span class="pl-c1">Parse</span>(&amp;param); err != <span class="pl-c1">nil</span> {
			<span class="pl-c1">panic</span>(err)
		}
		r.<span class="pl-smi">Response</span>.<span class="pl-c1">Write</span>(param)
	})
	s.<span class="pl-c1">SetPort</span>(<span class="pl-c1">8199</span>)
	s.<span class="pl-c1">Run</span>()
}</pre>
            </div>
            <p>
              这是执行结果，使用的是<code>master</code>分支：<br />
              <a
                target="_blank"
                rel="noopener noreferrer"
                href="https://user-images.githubusercontent.com/26347176/78990362-d777f680-7b68-11ea-8794-3898aa1fdd7c.png"
                ><img
                  src="https://user-images.githubusercontent.com/26347176/78990362-d777f680-7b68-11ea-8794-3898aa1fdd7c.png"
                  alt="image"
                  style="max-width: 100%;"
              /></a>
            </p>
            <p>没有复现你说的问题。</p>
          </article>
        </div>
      </div>
    </div>
  </Panel>
</template>

<script>
import Panel from "../uicomponents/Panel";

export default {
  components: { Panel },
};
</script>
